<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
    <script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/jquery.validate.js"></script>
    <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/main/bootstrap.min.css">
</head>
<body>
<div id="container">
    <%@include file="/jsp/public/top.jspf"%>
    <div id="mainbody">
        <div class="login">
            <div class="wrap">
                <div class="col_1_of_login span_1_of_login">
                    <h4 class="title">新顾客</h4>
                    <p>Lorem ipsum dolor sit amet,  in hendrerit in vulputate velit esse molestie consequat</p>
                    <div class="button">
                        <a href="<%=request.getContextPath() %>/user/register"><input type="submit" name="Submit" value="创建新账户"></a>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="col_1_of_login span_1_of_login">
                    <div class="login-title">
                        <h4 class="title">已注册用户请登录</h4>
                        <div id="loginbox" class="loginbox">

                            <form  action="<%=request.getContextPath() %>/user/login"  method="post" name="userForm">
                                <div class="form-group" ng-class="{ 'has-error' : userForm.username.$invalid && !userForm.username.$pristine}">
                                    <label class="labelCss">用户名或邮箱：</label>
                                    <input type="text" name="username"   ng-model="username"  class="form-control" required  >

                                </div>
                                <div class="form-group" ng-class="{ 'has-error' : userForm.pw1.$invalid && !userForm.pw1.$pristine }" >
                                    <label >密码：</label>
                                    <input type="password" name="password"   required  class="form-control"    ng-model="password"  required  >
                                </div>

                                <div class="form-group"  >
                                     <img src="drawCheckCode" align="center"  height="40px" class="image1"  style="float:right;height: 29px"  onclick="reCheckcode(this)"/>
                                     <input id="validateCode" name="checkcode" type="text" class="form-control" style="float:left; width: 50%"  value="请输入验证码" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '验证码';}" >
                                     ${error}

                                </div>


                                <br>
                                <br>
                                <br>

                                <div class="form-group"  align="center">
                                    <label ></label>
                                    <div class="button" align="center">
                                    <input type="submit" name="Submit" class="button" value="登录" ng-disabled="userForm.$invalid">
                                        <p class="terms"><a href="#">忘记密码？</a>.</p>
                                    </div>
                                </div>

                                <div class="clear"></div>




                            </form>
                        </div>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>
    <div class="footPush"></div>

</div>
<%@include file="/jsp/public/footer.jspf"%>
</body>
<script src="<%=request.getContextPath() %>/resources/js/public/angular.js"></script>
<script src="<%=request.getContextPath() %>/resources/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
    function reCheckcode(img) {
        img.src="drawCheckCode?"+Math.random();
    }
</script>
</html>

